Repository navigation
refactor(control-plane): split and slim quota monitor_poll_commit - #8885
Conversation
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent | model=gpt-6.2-sol | provider=OpenAI | reasoning_effort=max | source=runtime_reported
Request changes conclusion (author-owned PR; GitHub blocks formal self-review)
- [P2]
work_lane_contract超出既有旧字段预算。 调度准入与 codec 现在分别持有同一个旧字段,TypeScript 模块计数 3 → 4,超出上限 3。相同的语义词表检查在基线 124/124 通过,在 head 为 123/124,premerge 也复现失败。保留一个旧字段解码 owner,向另一模块传已解码的准入事实,冻结的 receipt 格式照旧。 准入读取 - [P2] 原生 v0 请求的首条诊断变了。 对同一
quota.monitor_poll.commitevent 请求,actor_agent_id=11和target_key=42同时出现时,base 先报 actor,head 先报 target。非法todo_id加同一个 target 也从先报 Todo 变成先报 target。两边均无写入,单字段无效与合法请求的对照一致。请保留 shared decoder,按原顺序调用它,并加入两个并发无效字段的完整错误对照。 提前执行的解码
动机 / Motivation
把单个 Monitor 提交模块中混在一起的参数解码、准入、provider 校验与 WAL 提交拆开。可观察约束来自 docs/reference/protocols/quota-monitor-observation-receipt-v0.md 在 31944d835466c29f18f843ea92de75b49e7c0c62 的固定版本。
调用方是定时记录观察的 Monitor 和恢复原请求的操作者。原模块同时解码、准入并提交回执,这版改为独立 codec、admission 和 provider 模块。File、SQLite 的观察提交与重放实测一致,原生 wire 的两组组合输入诊断仍有差异。评审范围是已有 Monitor 提交流程的重构及其兼容;沿用现有 provider、回执格式和 quota 规则。
改动思路 / Approach
保留原 effect-runtime method 和持久回执 owner,拆出 codec、admission 与 provider 三段。接受这一模块边界的前提是保留现有 wire、旧字段预算和原先的拒绝顺序。当前这两个差异可以在现有 seam 内修复,无需引入新 schema 或重写历史回执。
现有 codec 和 admission 边界足以共享解码,保留旧字段的单一 owner 和以前的诊断顺序。保留现有请求、持久回执和 WAL 提交 owner,在本 PR 修复旧字段扩散与首条诊断。
具体改动 / Changes
- No-spend replay。定向真实 CLI 测试在两个版本均为 54/54,覆盖 File、SQLite 状态、相同 Turn 重试、独立回读和无额外扣减。
- Legacy receipts。94 项定向 TypeScript 测试在两个版本均通过,包含既有 pending fingerprint、提交后重读与 scoped receipt。使用独立 PostgreSQL 的同路径验证仍待完成。
- Lease proof。真实 CLI 保护缺失 proof、错误 owner、释放后重放、原证明和 successor 写回。架构语义词表测试和 7 个原生 wire 对照覆盖额外的等价约束。8 个路径共 +1765/−2239。
关键代码讲解
evaluateQuotaMonitorPollCommit保留原来的 runtime 接口,仍在原 quota owner 和 index lock 下进入 WAL preflight/commit。 提交入口observationObject在解析 actor 与 Todo 前读取整组可选字符串,导致两组重叠错误越过旧的诊断优先级。 输入解析validatedProviderReceipt继续在返回批次前匹配 proof、cadence、结果和 successor。落盘和读回仍可经原 Monitor CLI 路径核验。 provider 回执
对主干的风险 / Risks
定向 File/SQLite 和 TypeScript 套件没有显示重复提交或租约变化。控制平面类型检查通过,本地 standard premerge 的失败来自旧字段预算。旧 smoke 的 lookback 断言在两个版本同样失败。PostgreSQL 本地镜像读取失败,本次未取得真实服务后端结果。GitHub CI 未纳入本结论。
语义与 CI 对齐
保留同一 Turn、同一原生协议、同一 provider 权限与 quota 规则。这次实测差异落在原生输入拒绝的诊断,以及旧字段的模块边界。
我的整体评价 / Verdict
请在 15fc98816d0edd7bab04b01c6acb152365b7d836 修复两项实测差异后复审。模块拆分的方向可保留。直接的交付面是 CLI 和内部原生调用,视觉检查不适用。
修后重跑原生组合输入和仓库词表检查,并保留两种本地 provider 的重放与写回证据。
English verdict: REQUEST_CHANGES at 15fc98816d0edd7bab04b01c6acb152365b7d836. The extraction exceeds the existing legacy-field module budget and changes first-error precedence on two matched runtime requests. File and SQLite acceptance passed on both revisions. PostgreSQL remains unverified.
Signed-off-by: LoopX Agent <[email protected]>
…ostic order Signed-off-by: LoopX Agent <[email protected]>
15fc988 to
d52a8c0
Compare
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent | model=Gemini | provider=Google | source=self_reported
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
本次针对精确提交 d52a8c07b17087e86f247dd2d24164237e570f11 复审 PR #8885,确认此前 5951072249 指出的两项阻塞问题已在最新提交中完整修复并通过验证。
动机 / Motivation
定时记录监控观察的 Monitor CLI 调用方、原生 effect runtime 调用方以及恢复既有 pending 回执的操作者。拆分前 monitor_poll_commit.ts 单文件重达 2,590 行,Codec、准入、Provider 校验与 WAL 事务耦合;上版拆分虽降行数但使 work_lane_contract 跨 4 个 TS 模块超出预算 3,且提前求值 decodeSharedStrings 让组合无效输入从先报 actor_agent_id 或 todo_id 变为先报 target_key。修复后拆分为 4 个职责单一模块(共 2,156 行),work_lane_contract 收敛回 3 个 TS 模块,组合无效输入与 origin/main 完全一致先报 actor_agent_id 或 todo_id。在保持 quota.monitor_poll.commit 原生接口、WAL/pending 回执格式与全部语义不变的前提下,将模块拆分为 codec、admission、provider 与 commit 四段,消除旧字段预算超标与诊断顺序偏移。不改写 quota.monitor_poll.commit v0/v1 协议字段、不迁移历史待恢复回执、不改变 quota 扣减或 File/SQLite/PostgreSQL 存储语义。
由于原单文件同时承载 JSON/SHA-256 编解码、工作队列准入判定、Todo Provider 回执校验和 WAL 事务修复,任意逻辑微调都会牵连 2,500 余行上下文;通过保持外部调用入口 evaluateQuotaMonitorPollCommit 与持久回执结构零变化,在可控范围内完成四段职责分离,使后续维护与测试定位更清晰。
改动思路 / Approach
将 work_lane_contract 与 external_evidence_observation 的解析收敛到 monitor_poll_codec.ts 的 monitorLaneFacts 单一边界,把无副作用的类型化 MonitorLaneFacts 事实传入 monitor_poll_admission.ts,既保留了四段模块解耦与持久化 admitted_decision 原样落盘,又满足控制平面语义词表对旧字段的模块数上限。本 PR 仅重构 loopx/control_plane/quota/monitor_poll_commit.ts 及其拆分子模块,并同步 canary/mutant/drift-smoke 锚点与 quota_monitor_poll_commit.test.ts 单元测试;不涉及 Python runtime、PostgreSQL 外部镜像及跨 PR 的 module_metric_baseline.json。
在具体边界划分上:monitor_poll_codec.ts 承担 Schema、规范 JSON 序列化、字段顺序解码与 monitorLaneFacts 提取;monitor_poll_admission.ts 仅消费类型化的 MonitorLaneFacts、MonitorDecision 和结算回读状态完成 blocked/external/due/auxiliary 准入判断;monitor_poll_provider.ts 负责 Todo Provider 计划与回执/无副作用证明校验;monitor_poll_commit.ts 作为唯一公开入口协调索引锁、WAL preflight/prepared/committed 状态机与损坏修复。对于组合输入校验顺序问题,放弃在 observationObject 与 providerPlanObject 顶部一次性预先求值所有共享字符串的做法,改为抽出按原序求值的 decodeSuccessorRouteFields,并在外层按 actor_agent_id、settlement_todo_id、reason_summary、todo_id、target_key、result_hash、cadence、next_due_at 的既定次序调用共享解码器。
具体改动 / Changes
依据规范 docs/reference/protocols/quota-monitor-observation-receipt-v0.md(固定基准 6a0f8bc17b439f1e5fa1d389ad5a87faf7d73b25)核对以下验收条目:C1(保留 quota.monitor_poll.commit 的 WAL preflight/commit/replay 与既有回执兼容)为 implemented;C2(控制旧字段 work_lane_contract <= 3 个 TS 模块及 external_evidence_observation <= 1 个 TS 模块)为 implemented;C3(保持组合无效观察的原始首条报错顺序且无副作用落盘)为 implemented。全仓修改涵盖 4 个 TS 控制平面模块、1 个 TS 单元测试文件及 4 个 Python canary/mutant/architecture 锚点同步文件。
关键代码讲解
monitorLaneFacts:在monitor_poll_codec.ts单一边界读取decision.work_lane_contract与decision.external_evidence_observation并构建只读MonitorLaneFacts,使monitor_poll_admission.ts不再出现旧字段引用,同时保留MonitorDecision原始字段结构确保pendingWAL 中的admitted_decision序列化格式字节一致。observationObject:先校验lease_proof与material_change_scope,再严格按actor_agent_id、settlement_todo_id、reason_summary、todo_id、target_key、result_hash、cadence、next_due_at、monitorSuccessorPriorities与decodeSuccessorRouteFields的原顺序求值,彻底消除target_key抢占actor_agent_id/todo_id首条诊断的回归。admission:仅消费monitorLaneFacts(request.decision)返回的布尔与集合事实执行 blocked、external、auxiliary 与 due 准入判定,与拆分前规则完全等价且零额外磁盘读写。validatedProviderReceipt:通过matchedOptional、requirePairMatch与requireCanonicalSuccessorRoute复用可选字段与 successor 对称校验,并沿用providerPlanObject原始字段验证顺序。evaluateQuotaMonitorPollCommit:保留原公开签名与withBorrowedQuotaAccountingOwner锁入口,对event、preflight、commit、provider_rejected四阶段及损坏索引尾行修复逻辑保持零行为漂移。
对主干的风险 / Risks
经精确 head d52a8c07b17087e86f247dd2d24164237e570f11 本地实测与对比验证,原阻塞主干合入的两项回归均已消除:examples/semantic-vocabulary-drift-smoke.py 输出 ok,其中 work_lane_contract.ts=3/3、external_evidence_observation.ts=1/1,tests/architecture/test_semantic_vocabulary_drift.py 全部通过;通过 dispatchEffectRuntimeMethod 与 effectRuntimeErrorPayload 在 origin/main 与当前 head 上对组合无效输入 (actor_agent_id=11, target_key=42)、(todo_id="invalid-todo", target_key=42) 及其单字段无效/合法对照进行逐字段对比,完整 loopx_effect_runtime_response_v0 错误信封完全一致且无索引写入。TS 控制平面 typecheck:control-plane 通过,test:control-plane 共 6,666 passed, 0 failed, 91 skipped(含 quota_monitor_poll_commit.test.ts 新增的首条诊断顺序测试与 pending WAL 重放测试);Python 架构、边界与 Monitor/Quota 定向套件通过 734 项(另 test_completed_advancement_retains_auxiliary_monitor_admission[file/sqlite-False-False] 2 项与 test_lark_projection_sinks_are_owned_by_the_extension_layer 1 项均已在 origin/main 基线复现为无关既有失败);canary premerge --tier quick、loopx check 公私边界扫描、check_rfc_bilingual.py、ruff check 与 catalog-planner-smoke.py 均通过。当前剩余未验证项仅限外部 PostgreSQL 容器实机后端;GitHub CI 未作为阻塞门控。
语义与 CI 对齐
本次属于 reuse_existing(aligned):未新增任何状态枚举、schema 版本或协议字段,work_lane_contract(TS 3/3)与 external_evidence_observation(TS 1/1)均严格收口回既有退休预算内;tests/architecture/test_semantic_vocabulary_drift.py 与 examples/shared-goal-authority-e2e/mutants.py 的文本锚点已同步指向拆分后的新模块路径。
我的整体评价 / Verdict
综合长程(long_horizon:preserved)与交互体验(user_experience:preserved)评估:本 PR 在不改变任何外部契约、回执指纹或诊断优先级的前提下,将超大单文件精简拆分为 4 个内聚模块(net -434 行),并补齐了旧字段预算收敛与组合错误诊断序回归测试,消除了上次评审的全部阻塞项。视觉检查判定:本 PR 仅调整控制平面内部 TypeScript 模块拆分、校验顺序与对应测试/canary 注册路径,无任何 Web UI、面板或渲染视图变更。 未覆盖范围:仅本地容器 PostgreSQL 独立服务端行为未在本环境实测,File 与 SQLite 本地后端及全部 TS 控制平面单元契约已实测通过。。验证状态汇总:TS 类型检查 PASS;test:control-plane(6,666 passed)PASS;semantic-vocabulary-drift-smoke PASS;原生 v0 错误信封基准对照 PASS;Python 定向架构与 Monitor/Quota 套件 PASS(基线无关既有失败除外);canary premerge --tier quick PASS;PostgreSQL 容器后端 UNVERIFIED。
English verdict: APPROVE at d52a8c07b17087e86f247dd2d24164237e570f11. Both prior P2 blockers (work_lane_contract TS budget 3/3 and overlapping observation first-field diagnostic precedence) are resolved and verified against origin/main with full TS (6,666 passed) and Python File/SQLite coverage; PostgreSQL remains unverified.
* refactor(core): defer benchmark implementations during capability discovery Preserve the benchmark toolkit public exports and static types while keeping execution and experiment implementations out of metadata discovery. Qualify source and installed Core paths, and reconcile the paired minimal/Standard RFC boundary without changing activation or authority defaults. Signed-off-by: cicolord <[email protected]> * Defer Yardstick evaluation until an enabled Explore read Signed-off-by: cicolord <[email protected]> * Omit empty Todo summary lanes from ordinary Worker context Signed-off-by: cicolord <[email protected]> * fix(update): honor configured archive directories during rollback Signed-off-by: LoopX Agent <[email protected]> * fix(lark): replay recall guard on current main Signed-off-by: huangruiteng <[email protected]> * docs: record the verified LoopX 2.3.0 release baseline Signed-off-by: LoopX Agent <[email protected]> * Preserve quota spend source when prepared work is admitted Signed-off-by: LoopX Agent <[email protected]> * test(quota): qualify native saved complete-Turn checkpoints Signed-off-by: LoopX Agent <[email protected]> * Retry cleanup of an owned file mutation marker Signed-off-by: LoopX Agent <[email protected]> * Keep synthetic Git-path test data outside the public source scan Signed-off-by: LoopX Agent <[email protected]> * fix(quota): share native preparation wait with readiness Signed-off-by: LoopX Agent <[email protected]> * fix(doctor): bind package update readback to its Python environment Signed-off-by: LoopX Agent <[email protected]> * Keep Doctor discovery separate from service activation Signed-off-by: LoopX Agent <[email protected]> * Verify the recorded Python launcher before Doctor probes it Signed-off-by: LoopX Agent <[email protected]> * fix(desktop): require runtime qualification for macOS preview updates Signed-off-by: LoopX Agent <[email protected]> * fix(quota): reuse replan projection owners during recovery Signed-off-by: LoopX Agent <[email protected]> * Qualify Codex 0.169 native context replay on main Signed-off-by: LoopX Agent <[email protected]> * Stop regenerating retired quota view aliases Signed-off-by: LoopX Agent <[email protected]> * fix: pin deferred native context reads to the original capture Signed-off-by: LoopX Agent <[email protected]> * Keep native capture navigation within small output budgets Signed-off-by: LoopX Agent <[email protected]> * Retire legacy heartbeat work prompt generation Signed-off-by: LoopX Agent <[email protected]> * Capture C1 composition failures as receipt diagnostics Signed-off-by: LoopX Agent <[email protected]> * Recover interrupted native Todo readiness from the original Turn Signed-off-by: LoopX Agent <[email protected]> * Revalidate the original lease before publishing resumed native context Signed-off-by: LoopX Agent <[email protected]> * Fence native readiness publication with the canonical lease writer Signed-off-by: LoopX Agent <[email protected]> * fix(scheduler): keep Codex fallback on the original C1 runtime Signed-off-by: LoopX Agent <[email protected]> * fix(scheduler): pin the originating fallback launchers Signed-off-by: LoopX Agent <[email protected]> * Retire the duplicate Codex App scheduler projection Signed-off-by: LoopX Agent <[email protected]> * Seed the recorded scheduler profile in the elapsed-backoff fixture Signed-off-by: LoopX Agent <[email protected]> * Verify canonical cadence on refused and settled Turns Signed-off-by: LoopX Agent <[email protected]> * Pin named Core commands in saved scheduler fallbacks Signed-off-by: LoopX Agent <[email protected]> * fix(research): preserve saved case addresses when a version cannot open Signed-off-by: LoopX Agent <[email protected]> * Preserve citation focus after a saved study refresh Signed-off-by: LoopX Agent <[email protected]> * Capture authenticated LoopX receipts for Research attention (#8790) * feat(research): capture authenticated LoopX attention receipts Signed-off-by: lusendong.6789 <[email protected]> Co-authored-by: TRAE CLI <[email protected]> * fix(research): tighten attention receipt provenance Signed-off-by: lusendong.6789 <[email protected]> Co-authored-by: TRAE CLI <[email protected]> * fix(research): publish attention captures after source validation Signed-off-by: huangruiteng <[email protected]> --------- Signed-off-by: lusendong.6789 <[email protected]> Signed-off-by: huangruiteng <[email protected]> Co-authored-by: TRAE CLI <[email protected]> Co-authored-by: huangruiteng <[email protected]> * Recover the original Session and Turn from a confirmed Chat task Signed-off-by: huangruiteng <[email protected]> * perf(lark,native_chat): eliminate redundant full-directory JSON reparsing in steward chat loops (#9041) * perf(lark,native_chat): avoid full directory reparsing in steward chat loops - Make LarkOwnerAttention._route iterate capture candidates lazily so matching stops at the newest valid p2p capture. - Reuse FileChatDiscovery in PrivateIngressObserver._records while preserving strict field validation and fail-closed errors. - Reuse FileChatDiscovery in ChatExternalConversations.pending so unchanged request journals skip redundant JSON reads and stay mutation-isolated. - Add regression and scan-efficiency tests in tests/test_lark_steward_directory_scan_perf.py. Signed-off-by: LoopX Agent <[email protected]> * fix(native-chat): project small recovery metadata fields to stop data_url memory growth Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * Retire transitional smoke checks and duplicate execution (#9073) Signed-off-by: lusendong.6789 <[email protected]> Co-authored-by: TRAE CLI <[email protected]> * feat(steward): support probe-gated generic continuous_monitor todos with handoff and user actions (#9074) Signed-off-by: LoopX Agent <[email protected]> * Remove redundant defensive prose from prompts and comments (#9072) Remove redundant defensive prose while preserving published heartbeat wrappers and externally managed skill readiness. Validated with 197 related tests, independent historical wrapper migrations and negative cases, installed-skill readback, and current-main quick canary. Existing CI qualification and infrastructure limitations remain recorded in PR #9072. Signed-off-by: lusendong.6789 <[email protected]> Signed-off-by: Lusen Dong <[email protected]> * Keep original Chat retry errors visible during receipt refresh Signed-off-by: LoopX Agent <[email protected]> * fix(steward): tolerate report validator python drift and allow cancel of mid-turn failed reports (#9077) Signed-off-by: LoopX Agent <[email protected]> * feat(steward): add exact-head PR review signals and protected merge confirmation (#9081) Signed-off-by: LoopX Agent <[email protected]> * feat(steward): add isolated OpenViking long-term memory with per-speaker boundaries (#9083) Signed-off-by: LoopX Agent <[email protected]> * refactor(content-ops): slim surface module and eliminate Any (#8961) * refactor(content-ops): slim surface module and eliminate Any Signed-off-by: LoopX Agent <[email protected]> * fix(content-ops): reject malformed angle source_item_ids containers Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(collaboration): batch handoff query Goal lifetime guard lock per Goal (#9085) Signed-off-by: LoopX Agent <[email protected]> * fix(hosts): raise managed service startup readiness timeout to 45s (#9087) Signed-off-by: LoopX Agent <[email protected]> * perf(manager-context): memoize history_inspect lifecycle checks and scope runtime revision in handoffs query (#9088) Eliminate the remaining O(N) Effect runtime RPCs and uncached runtime fingerprinting inside tracking.query(): enter effect_runtime_request_scope() for the query, memoize pure history_inspect lifecycle decisions across entries sharing identical Goal refs while holding the Goal lifetime guard, lazily discover legacy ingress files only when external audience recovery needs them, and preserve entry scan order across Goal batches. Signed-off-by: LoopX Agent <[email protected]> * refactor(lark): slim private_conversations below 2000 lines with net LOC reduction (#8929) Signed-off-by: LoopX Agent <[email protected]> * perf(chat,hosts): skip frontend source re-hashing on immutable installed releases and extend readiness timeout to 90s (#9089) Signed-off-by: LoopX Agent <[email protected]> * refactor(control-plane): split and slim quota monitor_poll_commit (#8885) * refactor(control-plane): split and slim quota monitor_poll_commit Signed-off-by: LoopX Agent <[email protected]> * fix(control-plane): preserve legacy lane budget and observation diagnostic order Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * refactor(quota): slim loopx/quota.py and tighten Any count to zero (#8939) Signed-off-by: LoopX Agent <[email protected]> * refactor(native-chat): slim external_conversations below 2k lines and retire ceiling (#8911) * refactor(native-chat): move steward commission mixin to steward_commands and retire external_conversations ceiling Signed-off-by: LoopX Agent <[email protected]> * fix(native-chat): respect include_raw_response in retained result recovery Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * refactor(chat): slim chat_runtime below 1,500 lines, fix entry-point project_contexts guard, and retire ceiling (#8920) * refactor(chat): move session lifecycle mixin to session_open, deduplicate runtime helpers, and retire ceiling Signed-off-by: LoopX Agent <[email protected]> * fix(chat): drop turn_done_events slot before waking waiters on Thread.start failure Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(steward): paginate open PR signal GraphQL, allow signal-unavailable monitor recovery, and cache private delivery scans (#9093) Signed-off-by: LoopX Agent <[email protected]> * perf(lark,native_chat): back off noop recovery retries and cache recovery lookups (#9096) Signed-off-by: LoopX Agent <[email protected]> * perf(native_chat,lark): cache unchanged quota backlog health and interrupt observations (#9098) Signed-off-by: LoopX Agent <[email protected]> * perf(lark,native_chat): coalesce listener snapshots and cache recovery event summaries (#9100) Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: cicolord <[email protected]> Signed-off-by: LoopX Agent <[email protected]> Signed-off-by: huangruiteng <[email protected]> Signed-off-by: lusendong.6789 <[email protected]> Signed-off-by: Lusen Dong <[email protected]> Co-authored-by: cicolord <[email protected]> Co-authored-by: huangruiteng <[email protected]> Co-authored-by: Lusen Dong <[email protected]> Co-authored-by: TRAE CLI <[email protected]>
* fix(cli): preserve typed runtime diagnostics in Turn failures Signed-off-by: LoopX Agent <[email protected]> * feat(steward): support per-endpoint model preferences and Codex-to-Antigravity failover (#9141) Signed-off-by: LoopX Agent <[email protected]> * Keep the prepared Chat adapter available to a retry (#9134) A failed worker start can finish cleanup after a same-turn retry has selected the adapter. Keep its lifetime tied to the Session and let failed dispatch release its own worker registration. The regression asserts one upstream turn and explicit adapter closure with the Session. Port the fix from 4453e4bdd77486ec14b952f88ca893310b32e26c. (cherry picked from commit 173e42b4f051b885c3a3389e1cad9c5722f7b7dd) Signed-off-by: LoopX Agent <[email protected]> * fix(steward): recover zero-effect monitors and cleared-replan reports (#9143) Signed-off-by: LoopX Agent <[email protected]> * fix(steward): admit flexible_primary_available executor transitions in conversation_scope (#9145) Signed-off-by: LoopX Agent <[email protected]> * Verify quota gate scope through signed lane references (#9101) * test(quota): verify scoped gates through complete lane references Signed-off-by: LoopX Agent <[email protected]> * Test canonical quota gates in both public response modes Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * Test C1 planning and Host input from the original quota capture (#9102) * Use recorded quota decisions in the no-Todo settlement regression Signed-off-by: LoopX Agent <[email protected]> * Exercise the complete Host prompt from the captured quota source Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * Prepare the CLI budget baseline with a private Git index (#9103) Signed-off-by: LoopX Agent <[email protected]> * Exercise C1 Goal delivery and bound replan from the saved source (#9104) Signed-off-by: LoopX Agent <[email protected]> * Keep long claim overlap scopes on demand (#9086) * Link long thin-claim overlap lists to their receipts Signed-off-by: LoopX Agent <[email protected]> * Read claim overlap details without copying the lease Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(quota): preserve explicit Monitor Todo selection (#9099) Carry Todo selection provenance into quota admission. Preserve explicit secondary Monitor polling and recovery from previously admitted receipts. Signed-off-by: LoopX Agent <[email protected]> * Keep ready Todo scope details on the required context read (#9106) Signed-off-by: LoopX Agent <[email protected]> * Fix archive rollback with custom install directories (#9066) * refactor(core): defer benchmark implementations during capability discovery Preserve the benchmark toolkit public exports and static types while keeping execution and experiment implementations out of metadata discovery. Qualify source and installed Core paths, and reconcile the paired minimal/Standard RFC boundary without changing activation or authority defaults. Signed-off-by: cicolord <[email protected]> * Defer Yardstick evaluation until an enabled Explore read Signed-off-by: cicolord <[email protected]> * Omit empty Todo summary lanes from ordinary Worker context Signed-off-by: cicolord <[email protected]> * fix(update): honor configured archive directories during rollback Signed-off-by: LoopX Agent <[email protected]> * fix(lark): replay recall guard on current main Signed-off-by: huangruiteng <[email protected]> * docs: record the verified LoopX 2.3.0 release baseline Signed-off-by: LoopX Agent <[email protected]> * Preserve quota spend source when prepared work is admitted Signed-off-by: LoopX Agent <[email protected]> * test(quota): qualify native saved complete-Turn checkpoints Signed-off-by: LoopX Agent <[email protected]> * Retry cleanup of an owned file mutation marker Signed-off-by: LoopX Agent <[email protected]> * Keep synthetic Git-path test data outside the public source scan Signed-off-by: LoopX Agent <[email protected]> * fix(quota): share native preparation wait with readiness Signed-off-by: LoopX Agent <[email protected]> * fix(doctor): bind package update readback to its Python environment Signed-off-by: LoopX Agent <[email protected]> * Keep Doctor discovery separate from service activation Signed-off-by: LoopX Agent <[email protected]> * Verify the recorded Python launcher before Doctor probes it Signed-off-by: LoopX Agent <[email protected]> * fix(desktop): require runtime qualification for macOS preview updates Signed-off-by: LoopX Agent <[email protected]> * fix(quota): reuse replan projection owners during recovery Signed-off-by: LoopX Agent <[email protected]> * Qualify Codex 0.169 native context replay on main Signed-off-by: LoopX Agent <[email protected]> * Stop regenerating retired quota view aliases Signed-off-by: LoopX Agent <[email protected]> * fix: pin deferred native context reads to the original capture Signed-off-by: LoopX Agent <[email protected]> * Keep native capture navigation within small output budgets Signed-off-by: LoopX Agent <[email protected]> * Retire legacy heartbeat work prompt generation Signed-off-by: LoopX Agent <[email protected]> * Capture C1 composition failures as receipt diagnostics Signed-off-by: LoopX Agent <[email protected]> * Recover interrupted native Todo readiness from the original Turn Signed-off-by: LoopX Agent <[email protected]> * Revalidate the original lease before publishing resumed native context Signed-off-by: LoopX Agent <[email protected]> * Fence native readiness publication with the canonical lease writer Signed-off-by: LoopX Agent <[email protected]> * fix(scheduler): keep Codex fallback on the original C1 runtime Signed-off-by: LoopX Agent <[email protected]> * fix(scheduler): pin the originating fallback launchers Signed-off-by: LoopX Agent <[email protected]> * Retire the duplicate Codex App scheduler projection Signed-off-by: LoopX Agent <[email protected]> * Seed the recorded scheduler profile in the elapsed-backoff fixture Signed-off-by: LoopX Agent <[email protected]> * Verify canonical cadence on refused and settled Turns Signed-off-by: LoopX Agent <[email protected]> * Pin named Core commands in saved scheduler fallbacks Signed-off-by: LoopX Agent <[email protected]> * fix(research): preserve saved case addresses when a version cannot open Signed-off-by: LoopX Agent <[email protected]> * Preserve citation focus after a saved study refresh Signed-off-by: LoopX Agent <[email protected]> * Capture authenticated LoopX receipts for Research attention (#8790) * feat(research): capture authenticated LoopX attention receipts Signed-off-by: lusendong.6789 <[email protected]> Co-authored-by: TRAE CLI <[email protected]> * fix(research): tighten attention receipt provenance Signed-off-by: lusendong.6789 <[email protected]> Co-authored-by: TRAE CLI <[email protected]> * fix(research): publish attention captures after source validation Signed-off-by: huangruiteng <[email protected]> --------- Signed-off-by: lusendong.6789 <[email protected]> Signed-off-by: huangruiteng <[email protected]> Co-authored-by: TRAE CLI <[email protected]> Co-authored-by: huangruiteng <[email protected]> * Recover the original Session and Turn from a confirmed Chat task Signed-off-by: huangruiteng <[email protected]> * perf(lark,native_chat): eliminate redundant full-directory JSON reparsing in steward chat loops (#9041) * perf(lark,native_chat): avoid full directory reparsing in steward chat loops - Make LarkOwnerAttention._route iterate capture candidates lazily so matching stops at the newest valid p2p capture. - Reuse FileChatDiscovery in PrivateIngressObserver._records while preserving strict field validation and fail-closed errors. - Reuse FileChatDiscovery in ChatExternalConversations.pending so unchanged request journals skip redundant JSON reads and stay mutation-isolated. - Add regression and scan-efficiency tests in tests/test_lark_steward_directory_scan_perf.py. Signed-off-by: LoopX Agent <[email protected]> * fix(native-chat): project small recovery metadata fields to stop data_url memory growth Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * Retire transitional smoke checks and duplicate execution (#9073) Signed-off-by: lusendong.6789 <[email protected]> Co-authored-by: TRAE CLI <[email protected]> * feat(steward): support probe-gated generic continuous_monitor todos with handoff and user actions (#9074) Signed-off-by: LoopX Agent <[email protected]> * Remove redundant defensive prose from prompts and comments (#9072) Remove redundant defensive prose while preserving published heartbeat wrappers and externally managed skill readiness. Validated with 197 related tests, independent historical wrapper migrations and negative cases, installed-skill readback, and current-main quick canary. Existing CI qualification and infrastructure limitations remain recorded in PR #9072. Signed-off-by: lusendong.6789 <[email protected]> Signed-off-by: Lusen Dong <[email protected]> * Keep original Chat retry errors visible during receipt refresh Signed-off-by: LoopX Agent <[email protected]> * fix(steward): tolerate report validator python drift and allow cancel of mid-turn failed reports (#9077) Signed-off-by: LoopX Agent <[email protected]> * feat(steward): add exact-head PR review signals and protected merge confirmation (#9081) Signed-off-by: LoopX Agent <[email protected]> * feat(steward): add isolated OpenViking long-term memory with per-speaker boundaries (#9083) Signed-off-by: LoopX Agent <[email protected]> * refactor(content-ops): slim surface module and eliminate Any (#8961) * refactor(content-ops): slim surface module and eliminate Any Signed-off-by: LoopX Agent <[email protected]> * fix(content-ops): reject malformed angle source_item_ids containers Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(collaboration): batch handoff query Goal lifetime guard lock per Goal (#9085) Signed-off-by: LoopX Agent <[email protected]> * fix(hosts): raise managed service startup readiness timeout to 45s (#9087) Signed-off-by: LoopX Agent <[email protected]> * perf(manager-context): memoize history_inspect lifecycle checks and scope runtime revision in handoffs query (#9088) Eliminate the remaining O(N) Effect runtime RPCs and uncached runtime fingerprinting inside tracking.query(): enter effect_runtime_request_scope() for the query, memoize pure history_inspect lifecycle decisions across entries sharing identical Goal refs while holding the Goal lifetime guard, lazily discover legacy ingress files only when external audience recovery needs them, and preserve entry scan order across Goal batches. Signed-off-by: LoopX Agent <[email protected]> * refactor(lark): slim private_conversations below 2000 lines with net LOC reduction (#8929) Signed-off-by: LoopX Agent <[email protected]> * perf(chat,hosts): skip frontend source re-hashing on immutable installed releases and extend readiness timeout to 90s (#9089) Signed-off-by: LoopX Agent <[email protected]> * refactor(control-plane): split and slim quota monitor_poll_commit (#8885) * refactor(control-plane): split and slim quota monitor_poll_commit Signed-off-by: LoopX Agent <[email protected]> * fix(control-plane): preserve legacy lane budget and observation diagnostic order Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * refactor(quota): slim loopx/quota.py and tighten Any count to zero (#8939) Signed-off-by: LoopX Agent <[email protected]> * refactor(native-chat): slim external_conversations below 2k lines and retire ceiling (#8911) * refactor(native-chat): move steward commission mixin to steward_commands and retire external_conversations ceiling Signed-off-by: LoopX Agent <[email protected]> * fix(native-chat): respect include_raw_response in retained result recovery Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * refactor(chat): slim chat_runtime below 1,500 lines, fix entry-point project_contexts guard, and retire ceiling (#8920) * refactor(chat): move session lifecycle mixin to session_open, deduplicate runtime helpers, and retire ceiling Signed-off-by: LoopX Agent <[email protected]> * fix(chat): drop turn_done_events slot before waking waiters on Thread.start failure Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(steward): paginate open PR signal GraphQL, allow signal-unavailable monitor recovery, and cache private delivery scans (#9093) Signed-off-by: LoopX Agent <[email protected]> * perf(lark,native_chat): back off noop recovery retries and cache recovery lookups (#9096) Signed-off-by: LoopX Agent <[email protected]> * perf(native_chat,lark): cache unchanged quota backlog health and interrupt observations (#9098) Signed-off-by: LoopX Agent <[email protected]> * perf(lark,native_chat): coalesce listener snapshots and cache recovery event summaries (#9100) Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: cicolord <[email protected]> Signed-off-by: LoopX Agent <[email protected]> Signed-off-by: huangruiteng <[email protected]> Signed-off-by: lusendong.6789 <[email protected]> Signed-off-by: Lusen Dong <[email protected]> Co-authored-by: cicolord <[email protected]> Co-authored-by: huangruiteng <[email protected]> Co-authored-by: Lusen Dong <[email protected]> Co-authored-by: TRAE CLI <[email protected]> * refactor(issue-fix): consolidate maintainer-correction admission and slim pr_lifecycle (#8897) Signed-off-by: LoopX Agent <[email protected]> * Fix truncated requests and responses in the Codex API relay (#8713) * fix(codex relay): fence incomplete model requests before drain Signed-off-by: LoopX Agent <[email protected]> * fix(codex relay): surface incomplete upstream responses Port the verified response framing fix to the request-admission branch. Original candidate 27bc3aee311cdfc6a00466ff9d3b58c7db36e01b. Signed-off-by: LoopX Agent <[email protected]> * Bound Codex relay writes to clients that stop reading Signed-off-by: LoopX Agent <[email protected]> * Reject upstream chunked responses missing the trailer terminator Signed-off-by: LoopX Agent <[email protected]> * Validate upstream chunk data delimiters before relay completion Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(release): repair dsh closeout test, antigravity failover alias, and release download retry (#9147) Signed-off-by: LoopX Agent <[email protected]> * docs(release): update v2.4.0 release notes and dsh-loopx-plugin 0.1.1-beta.7 README (#9149) Signed-off-by: LoopX Agent <[email protected]> * fix(chat): recover saved answers and diagnose lost workers (#9120) * fix(chat): recover saved answers and diagnose lost workers Signed-off-by: LoopX Agent <[email protected]> * style(lark): keep private_conversations within module line budget Signed-off-by: LoopX Agent <[email protected]> * fix(chat): retain execution_worker_exited in pending backlog count Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(chat): resume steward requests lost before dispatch (#9125) Signed-off-by: LoopX Agent <[email protected]> * fix(benchmark): restore frozen v1 archives and align checkpoint/runtime tests with C1 defaults (#9151) Signed-off-by: LoopX Agent <[email protected]> * fix(release): stabilize CLI help, architecture guards, onboarding gate, and public smokes (#9152) Signed-off-by: LoopX Agent <[email protected]> * fix(steward): recover report selection across python upgrades and prevent queue kill on observation monitors (#9155) Signed-off-by: LoopX Agent <[email protected]> * fix(release): align extensions, chat, presentation, and transport tests for v2.4.0 (#9156) Signed-off-by: LoopX Agent <[email protected]> * fix(control-plane): stabilize v2.4.0 quota, turn-envelope, and capabilities slice (Slice B1) (#9154) * fix(control-plane): stabilize v2.4.0 quota, turn-envelope, and capabilities slice Signed-off-by: LoopX Agent <[email protected]> * fix(quota): preserve tokenless identity and exact numeric types in attach_complete_turn_context Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(steward): recover frozen report contract failures and rebind resumed task leases (#9157) Signed-off-by: LoopX Agent <[email protected]> * fix(steward): recover pre-dispatch runtime failures across endpoints and stop receipt-unknown disk churn (#9159) Signed-off-by: LoopX Agent <[email protected]> * fix(control_plane): align lease recovery, settlement readback, and runtime fixtures (#9158) * fix(control_plane): align lease recovery, settlement readback, and runtime fixtures Signed-off-by: LoopX Agent <[email protected]> * fix(control_plane): forward record_capture in worker outage test and harden version type guard Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(control-plane): stabilize v2.4.0 explore, context, and checkpoint tail slice (Slice B4) (#9161) Signed-off-by: LoopX Agent <[email protected]> * fix(control-plane): stabilize v2.4.0 replan, monitor recovery, and staged-read slice (Slice B5) (#9160) Signed-off-by: LoopX Agent <[email protected]> * docs(release): reconcile final v2.4.0 stabilization PRs and boundary wording (#9162) * docs(release): reconcile final v2.4.0 stabilization PRs and boundary wording Signed-off-by: LoopX Agent <[email protected]> * docs(release): align #9158 and #9161 descriptions with verified commits Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> * fix(steward): tolerate minor JSON delimiter glitches and recover saved report candidates (#9164) Signed-off-by: LoopX Agent <[email protected]> * fix(control-plane): preserve bound yardstick reversals in native replan openings (#9165) Signed-off-by: LoopX Agent <[email protected]> * fix(native-chat): recover loopback relay 401 failures and isolate test auth (#9167) Signed-off-by: LoopX Agent <[email protected]> --------- Signed-off-by: LoopX Agent <[email protected]> Signed-off-by: cicolord <[email protected]> Signed-off-by: huangruiteng <[email protected]> Signed-off-by: lusendong.6789 <[email protected]> Signed-off-by: Lusen Dong <[email protected]> Co-authored-by: cicolord <[email protected]> Co-authored-by: huangruiteng <[email protected]> Co-authored-by: Lusen Dong <[email protected]> Co-authored-by: TRAE CLI <[email protected]>
Goal / Source
Split and deduplicate the oversized
loopx/control_plane/quota/monitor_poll_commit.tscore module into single-responsibility submodules underloopx/control_plane/quota/, reducing file complexity and removing internal duplication while keeping external contracts unchanged.Current Gap
loopx/control_plane/quota/monitor_poll_commit.tspreviously weighed 2,590 lines, combining input/receipt codecs, canonical Python-compatible JSON hashing, admission gates, Todo provider plan/receipt validation, and durable WAL/artifact transaction commits, with repeated optional-trimmed decoders, hash wrappers (sha256Hex/sha256/sha256Bytes), successor pair checks, and preflight/commit conflict builders.Observable Result
loopx/control_plane/quota/monitor_poll_commit.ts:586lines (-77.4% from2,590; durable WAL/artifact IO, index repair,validateReceiptScoperetaining its singleDECLARED_UNFOLDABLERegExp,hasMonitorPollTransaction,evaluateQuotaMonitorPollCommit, and full public re-exports)loopx/control_plane/quota/monitor_poll_codec.ts:712lines (schemas, shared interfaces, canonicalpythonJson& unifiedsha256Hex/sha256(string | Uint8Array), shared string-field decoders, strict object codecs,monitorResult/conflictResult)loopx/control_plane/quota/monitor_poll_admission.ts:475lines (blocked/external/due/auxiliary admission gates,buildRecord,indexRecordFor,monitorMarkdown,payloadFor)loopx/control_plane/quota/monitor_poll_provider.ts:337lines (providerPlanFor,providerDispatchPlan,validatedProviderReceipt,requestWithProvider,conflictFields,validateNoEffect)readOptionalText->readOptionalBytes), successor pair assertions (requirePairMatch), provider receipt optional checks (matchedOptional), expected provider plan checks (verifiedProviderPlan), dry-run preview handling (evaluateDryRunRequest), andconflictResultbuilders.tests/architecture/test_semantic_vocabulary_drift.pyliteral snippet target tomonitor_poll_admission.ts.examples/shared-goal-authority-e2e/mutants.py(monitor_route_rewrites_fingerprint) target tomonitor_poll_codec.ts.monitor_poll_commit.tsinloopx/canary/planner.pyandloopx/canary/qualification_profiles.py.Verification
npm run typecheck:control-plane(tsc --project tsconfig.control-plane.json --noEmit): exit0npm run test:control-plane: 6,566 passed, 0 failed, 91 skipped (6,657total)quota_monitor_poll_commit.test.ts,auxiliary_monitor_settlement.test.ts,quota_settlement_readback.test.ts,unsettled_host_turn_recovery.test.ts,content_digest_single_owner.test.ts): 271 passed, 0 failedtest_semantic_vocabulary_drift.py,test_settlement_receipt_source_boundaries.py,test_prior_closeout_preflight_budget.py,test_effect_turn_live_quota_decision.py,test_quota_monitor_poll_runtime.py,test_quota_settlement_cli.py,test_monitor_quiet_due_recovery.py,test_leased_monitor_poll.py,test_monitor_followthrough_contract.py): 499 passed, 0 failedtests/architecture/test_control_plane_import_boundaries.py -k "not test_lark_projection_sinks_are_owned_by_the_extension_layer": 30 passed (test_lark_projection_sinks_are_owned_by_the_extension_layeris an unrelated pre-existing baseline failure onorigin/maininloopx.capabilities.native_chat.queue_api)uv run --extra test python examples/canary/catalog-planner-smoke.py:okmonitor_route_rewrites_fingerprintmutant transform verified againstloopx/control_plane/quota/monitor_poll_codec.tsloopx --format json check --scan-path ...on all 8 touched/added files:ok=true,errors=0,public_boundary_scan.ok=true